package com.dgshanger.sanhxiaofeisc.ui.person.setting

import com.dgshanger.sanhxiaofeisc.R
import com.dgshanger.sanhxiaofeisc.mvp.contract.EditPasswordContract
import com.dgshanger.sanhxiaofeisc.mvp.presenter.EditPasswordPresenter
import com.xx.baseuilibrary.mvp.BaseMvpActivity
import kotlinx.android.synthetic.main.activity_edit_pw.*


/**
 * EditPasswordActivity
 * 沉迷学习不能自拔
 * Describe：修改密码页面
 * Created by 雷小星🍀 on 2018/4/16 10:40.
 */
class EditPasswordActivity : BaseMvpActivity<EditPasswordContract.Model, EditPasswordContract.View, EditPasswordPresenter>(),
        EditPasswordContract.View {

    override fun createPresenter(): EditPasswordPresenter = EditPasswordPresenter()

    override val oldPassword: String
        get() = et_old_pw.text.toString().trim()
    override val newPassword: String
        get() = et_new_pw.text.toString().trim()
    override val surePassword: String
        get() = et_sure_pw.text.toString().trim()

    override fun getActivityLayoutId(): Int = R.layout.activity_edit_pw

    override fun initData() {
    }

    override fun initEvent() {
        btn_sure.setOnClickListener {
            getPresenter().modifyPwd()
        }
    }
}